<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>Feed to DOM</title>
		<style type="text/css">
			.yui-entry-content_full {
				display: none;
			}
		</style>
	</head>
	
	<body>
		
		<h1>Feed to DOM</h1>
		<div id="yui_blog"></div>
		
		<script src="http://yui.yahooapis.com/3.0.0pr2/build/yui/yui-min.js" type="text/javascript"></script>
		<script type="text/javascript" src="http://www.google.com/jsapi"></script>
		<script type="text/javascript">
			YUI({
				filter: 'DEBUG',
				modules: {
					feed: {
						fullpath: 'feed.js',
						requires: ['widget']
					}
				}
			}).use('feed', function(Y){
				
				function renderFeed() {
					var feed = new google.feeds.Feed('http://feeds.yuiblog.com/YahooUserInterfaceBlog');
					feed.setNumEntries( 10 );
					feed.includeHistoricalEntries();
					feed.load(function( result ){
						var renderedFeed = new Y.Feed( Y.merge( result.feed, { contentBox:'#yui_blog' } ) );
						renderedFeed.render();
					});
				}
				
				Y.on('domready', function(){
					google.load("feeds", "1", { 'nocss':true, 'callback':renderFeed });
				});
				
			});
		</script>
		
	</body>
</html>
